<template lang="pug">
.list
  .list-header
    .list-header-tabs
      el-radio-group(size="small" v-model="tabActive")
        el-radio-button(v-for="item in tabs", :label="item.value") {{item.label}}
    .list-header-filter
      header-filter(:filter="filter")
  .material-list
    .material-item(v-for="item in 20")
      .material-item-img(src="")
      .material-item-bd
        
</template>

<script>
import headerFilter from '@/components/headerFilter'
export default {
  name: 'findList',
  components: {
    headerFilter
  },
  data () {
    return {
      tabActive: '',
      tabs: [
        { label: '全部', value: '' },
        { label: '进行中', value: 1 },
        { label: '已反馈', value: 2 },
        { label: '已结束', value: 3 }
      ],
      filter: [
        [
          {
            name: '材料名称：',
            type: 'select',
            key: 'goods_from',
            goods_from: '',
            handle: '',
            optLabel: 'name',
            optValue: 'value',
            options: [
              { name: '全部', value: 'all' },
              { name: '自营商品', value: 'plat' },
              { name: '巢搭配商品', value: 'cdp' }
            ]
          },
          {
            name: '近段时间：',
            type: 'select',
            key: 'goods_from',
            goods_from: '',
            handle: '',
            optLabel: 'name',
            optValue: 'value',
            options: [
              { name: '全部', value: 'all' },
              { name: '自营商品', value: 'plat' },
              { name: '巢搭配商品', value: 'cdp' }
            ]
          },
          {
            name: '时间选择：',
            type: 'select',
            key: 'delivery_type',
            handle: '',
            delivery_type: '',
            optLabel: 'delivery_type',
            optValue: 'delivery_type',
            options: []
          }
        ],
        [
          {
            name: '业态：',
            type: 'default',
            key: 'brand_id',
            brand_id: '',
          },
          {},
          {
            type: 'handle',
            buttons: [
              { name: 'primary', label: '查询', handle: this.search },
              { label: '重置', handle: this.reset }
            ]
          }
        ]
      ],
    }
  },
  methods: {
    changeSelect() {},
    search () {},
    reset () {}
  }
} 
</script>

<style lang="scss" scoped>
.list {
  padding: 0 32px;
}
.list-header {
  width: 100%;
  padding: 32px 24px;
  background: #FFFFFF;
  border-radius: 4px;
}
.list-header-filter {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #CBCBCB;
}
.filter-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  &:last-child {
    margin-bottom: 0;
  }
}
.filter-col {
  min-width: 320px;
  margin-right: 30px;
  display: flex;
  align-items: center;
  .filter-col-label {
    width: 100px;
    padding-right: 10px;
    text-align: right;
    font-size: 14px;
    color: #363636;
  }
  .filter-col-bd {
    width: 220px;
    .el-select {
      width: 100%;
    }
    .el-input {
      width: 100%;
    }
    &.filter-col-handle {
      text-align: right;
    }
  }
}
.material-list {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
}
.material-item {
  width: 317px;
  height: 364px;
  background: #FFFFFF;
  border-radius: 4px;
  margin-right: 15px;
  margin-bottom: 16px;
  padding: 20px;
  &:hover {
    box-shadow: 0px 5px 18px 2px rgba(44, 44, 44, 0.2);
  }
  &:nth-child(5n) {
    margin-right: 0;
  }
}
</style>
